import os
import time


def run_task():
    cmd = "cd /mnt/disk1/darknet-master && ./darknet detector train /mnt/disk1/vanlance/project/ct_electricity_meter/data/water/model_tiny/coco.data /mnt/disk1/vanlance/project/ct_electricity_meter/data/water/model_tiny/yolov3-tiny.cfg /mnt/disk1/vanlance/project/ct_electricity_meter/data/water/model_tiny/yolov3-tiny.conv.15 -gpus 0,1"
    run_time = 1616948140 + 60 * 60
    while True:
        t = time.time()
        if t > run_time:
            break
        else:
            time.sleep(1)
        print(t)
    os.system(cmd)


if __name__ == "__main__":
    run_task()